Make sure the static string is long enough. (#136323, Morten Welinder)
authorMatthias Clasen <maclas@gmx.de>
Fri, 30 Apr 2004 04:21:42 +0000 (04:21 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 30 Apr 2004 04:21:42 +0000 (04:21 +0000)
Fri Apr 30 00:19:11 2004  Matthias Clasen  <maclas@gmx.de>

* xdgmimemagic.c (_xdg_mime_magic_read_a_number): Make sure
the static string is long enough.  (#136323, Morten Welinder)

gtk/xdgmime/ChangeLog
gtk/xdgmime/xdgmimemagic.c

index 61a14565b15e8d926baab964160e1fa9b944b08a..7ac489eaf379f7d137a9e4f3da8c6da36c7e4772 100644 (file)
@@ -1,3 +1,8 @@
+Fri Apr 30 00:19:11 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * xdgmimemagic.c (_xdg_mime_magic_read_a_number): Make sure
+       the static string is long enough.  (#136323, Morten Welinder)
+
 2004-03-12  Morten Welinder  <terra@gnome.org>
 
        * *.c: Make sure to include <config.h>  (#137001)
index f368e40834cead8d4d58cb0019e542f3120dafc7..1a6e6b9001d765f6450ded0f4aaa0fc9cc74427b 100644 (file)
@@ -196,7 +196,7 @@ _xdg_mime_magic_read_a_number (FILE *magic_file,
 {
   /* LONG_MAX is about 20 characters on my system */
 #define MAX_NUMBER_SIZE 30
-  char number_string[MAX_NUMBER_SIZE];
+  char number_string[MAX_NUMBER_SIZE + 1];
   int pos = 0;
   int c;
   long retval = -1;